<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
	<head th:replace="common/form :: head"></head>
	<body class="mainbody">
		<form method="POST" th:object="${obj}">
			<div th:replace="common/form :: location('设备管理',*{id} gt 0 ?'修改设备信息':'新增设备')"></div>
			<div id="floatHead" class="content-tab-wrap">
			  <div class="content-tab">
			    <div class="content-tab-ul-wrap">
			      <ul>
			        <li><a href="javascript:;">设备信息</a></li>
			      </ul>
			    </div>
			  </div>
			</div>
			<div class="tab-content">
				<dl th:if="*{id} == 0">
					<dt>设备名</dt>
				    <dd>
				      <input type="text" th:field="*{name}" class="input normal" data-type="*0-100" />
				      <span class="Validform_checktip">*设备名不能为空</span>
				    </dd>
				</dl>
				
				<dl>
					<dt>数量</dt>
				    <dd>
				      <input type="text" th:field="*{sum}" class="input normal" data-type="*1-10" />
				      <span class="Validform_checktip">*数量不能为空</span>
				    </dd>
				</dl>
			 	
				<dl>
					<dt>申请时间</dt>
				    <dd>
				      <input type="date" th:field="*{applyTime}" class="input normal" data-type="*2-10" />
				      <span class="Validform_checktip">*申请时间不能为空</span>
				    </dd>
				</dl>
				
				<dl>
					<dt>开始时间</dt>
				    <dd>
				      <input type="date" th:field="*{startTime}" class="input normal" data-type="*2-10" />
				      <span class="Validform_checktip">*开始时间不能为空</span>
				    </dd>
				</dl>
				
				<dl>
					<dt>结束时间</dt>
				    <dd>
				      <input type="date" th:field="*{endTime}" class="input normal" data-type="*2-10" />
				      <span class="Validform_checktip">*结束时间不能为空</span>
				    </dd>
				</dl>
				
				
				
				<dl>
					<dt>申请者</dt>
				    <dd>
				    	<span class="rule-multi-porp">
				    		<th:block th:each="employee,employeeStat:${@employeeService.getAllEmployees()}">
				    			<input type="checkbox" th:name="employeeId" th:value="${employee.id}" th:if="${obj.employee  == null}" />
								<input type="checkbox" th:name="employeeId" th:value="${employee.id}" th:if="${obj.employee != null}" th:checked="${obj.employee.id} == ${employee.id}"/>
								<label th:for="'employee['+${employeeStat.count-1}+'].id'" th:text="${employee.name}"></label>
				    		</th:block>
				    	</span>
				    </dd>
				</dl>
				 
				<dl>
					<dt>审核者</dt>
				    <dd>
				    	<span class="rule-multi-porp">
				    		<th:block th:each="employee1,employeeStat:${@employeeService.getAllEmployees()}">
				    			<input type="checkbox" th:name="employeeId1" th:value="${employee1.id}" th:if="${obj.employee1  == null}" />
								<input type="checkbox" th:name="employeeId1" th:value="${employee1.id}" th:if="${obj.employee1 != null}" th:checked="${obj.employee1.id} == ${employee1.id}"/>
								<label th:for="'employee1['+${employeeStat.count-1}+'].id'" th:text="${employee1.name}"></label>
				    		</th:block>
				    	</span>
				    </dd>
				</dl>
				
				<dl>
					<dt>状态</dt>
					<dd>
				    <label style="width: 80px;"> 
        				<input th:field="*{state}" type="radio" name="mode" value="已审核"/>&nbsp;&nbsp;已审核
    				</label>
    				
    				<label style="width: 80px;"> 
        				<input th:field="*{state}" type="radio" name="mode" value="未审核"/>&nbsp;&nbsp;未审核
    				</label>
    				</dd>
				</dl>
				
			</div>
			<div th:replace="common/form :: footer"></div>
		</form>
		<script type="text/javascript" th:replace="common/form :: formscript"></script>
	</body>
</html>